package com.twu.biblioteca;

public class Login {


    public static String getMembershipDetailsOnLogin(String userName, String password) {

        if ("111-1111".equals(userName) && "letmein".equals(password)){
            return new User("Emily", "enemilyn@gmail.com", "0715128917").getUserInformation();

        } else if("123-1234".equals(userName) && "niceone".equals(password)){
            return new User("Troy", "troy@gmail.com", "0778129234").getUserInformation();
        } else if ("765-5672".equals(userName) && "dontask".equals(password)){
            return new User("Pink", "pink@gmail.com", "0795123846").getUserInformation();
        }else{
            return "User does not exist.";
        }
    }

    public static boolean loginUser(String userName, String password) {
        if (userName.length() == 8)
            return true;
        return false;
    }
}
